package com.qf.oop.extend;

public class Animal {

    String breed;

    private String sex;

    protected int age;

    public Animal() {
        System.out.println("动物被创建了");
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void sleep(){
        test1();
        System.out.println("性别为:"+sex+ "的动物在睡觉!!");

    }

    public void eat(){
        System.out.println("动物在吃饭");
    }


    private void test1(){
        System.out.println("test1 运行了");
    }


}
